const util = {
    treeDataHandle(data) {
        const list = [];
        for(const vo of data) {
            !vo.children && (vo.children = []);
            for(const item of data) {
                if (item.parentId === vo.id) {
                    vo.children.push(item);
                }
            }
            !vo.parentId && (list.push(vo));
        }
        return list;
    },
    getResponseData() {
        const data = {
            code: 200,
            content: '',
            message: '获取成功！'
        };
        return data;
    }
};
module.exports = util;